package sonet;

import java.util.*;


public class Message implements IdentificableEntity, Attachment{
	
	private int _identifier;
	private Agent _sender;
	private Agent _receiver;
	private String _subject;
	private String _text;
	private List<Agent> _recipientsId;
	private List<Attachment> _attachmentList;  
	
	public Message(){}
	
	public Message(int id, Agent from, Agent to, String subject, String text){
		_identifier = id;
		_sender = from;
		_receiver = to;
		_text = text;
		_subject = subject;
	}
	
	public Message(int id, Agent from, List<Agent> recipientsId, String subject, String text, List<Attachment> attachList){
		_identifier = id;
		_sender = from;
		_recipientsId = new ArrayList<Agent>(recipientsId);
		_text = text;
		_subject = subject;
		_attachmentList = new ArrayList<Attachment>(attachList);		
	}

	public int getIdentifier(){
		return _identifier;
	}
	
	int getSenderId(){
		return _sender.getIdentifier();
	}
	
	String getSubject(){
		return _subject;
	}
	
	String getText(){
		return _text;
	}
	
	List getRecipientsId(){
		return _recipientsId;
	}
	
	List getAttachments(){
		return _attachmentList;
	}
	
}
